package base.oop;

/**
 * @Author Fizz Pu
 * @Date 2021/4/5 下午2:42
 * @Version 1.0
 * 失之毫厘，缪之千里！
 */
public class AbstactClass {
}

enum Note{
    DUO, RE, MI
}

abstract class Instrument{
    private int i;
    public abstract void play(Note n);
    public String what(){ // 子类可以不用实现此方法, 直接继承即可
        return "Instrument";
    }
    public abstract void adjust();
}

class Wind extends Instrument{
    @Override
    public void play(Note n) {
        System.out.println(n);
    }

    @Override
    public void adjust() {
        System.out.println("adjust");
    }

    @Override
    public String what() {
        return "Wind";
    }

    public static void main(String[] args) {
        Instrument instrument = new Wind();
        instrument.adjust();
        instrument.play(Note.DUO);
        System.out.println(instrument.what());
    }
}